{include admin.inc.header}

{include admin.inc.top}

<div class="container-fluid content-body">
	<div class="main">
		{include admin.inc.menu}

		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				{include admin.inc.bread}

				<!-- Nav tabs -->
				<ul class="nav nav-tabs">
					{loop $__sysmenus[$menu_key][subs] $k $v}
					<li{if $v[id]==$menu_id} class="active"{/if}><a href="{if $v[id]==$menu_id}javascript:;{else}/{$v[url]}{/if}"><i class="glyphicon glyphicon-th-list"></i> {$v[name]}</a></li>
					{/loop}
				</ul>
				<div class="inner-container">

					<form id="J_List_Form">
						<nav class="inline-form clearfix"></nav>
						<div class="table-responsive">
							<table class="table table-bordered table-hover" id="J_List_Table">
								<thead>
								<tr>
									<th width="20"><input type="checkbox" class="icheck check-all" /></th>
									<th>微信ID</th>
									<th>微信昵称</th>
									<th>关联帐号</th>
									<th>已报价次数</th>
									<th>被浏览次数</th>
									<th>报价时间</th>


									<th>操作</th>
								</tr>
								</thead>
								<tbody>
								{if empty($items)}
								<tr>
									<td class="no-records text-center">{$noRecords}</td>
								</tr>
								{/if}
								{loop $items $value}
								<tr>
									<td><input type="checkbox" class="icheck" name="ids[]" id="checkbox_row_{$value[id]}" /></td>
									<td><label for="checkbox_row_{$value[id]}">{$value[wx_id]}</label></td>
									<td>{$value[username]}</td>
									<td>{$value[username]}</td>
									<td>{$value[offer_counts]}</td>

									<td>{$value[offer_views]}</td>
									<td>{$value[addtime]}</td>


									<td>

										<a href="searchByOffers?saas_user_id={$value[saas_user_id]}">详情</a>

									</td>
								</tr>
								{/loop}
								</tbody>
							</table>
						</div>
					</form>

					<div class="text-right">
						{$pagemenu}
					</div>

				</div>

			</div><!-- end of inner -->
		</section>

	</div>
</div>

{include admin.inc.footer}

<script type="text/html" id="content-add-template">

	<form role="form" class="content-add-form" id="content-add-form" autocomplete="off">

		<input type="password" style="position: absolute;left:-9999px;opacity: 0;">

		<div class="form-element">
			<div class="form-group">
				<label><span class="asterisk">*</span> 手机号码</label>
				<input type="text" dtype="mobile" name="data[username]" value="{[item.username]}" class="form-control" maxlength="11" placeholder="手机号码" required />
			</div>
			<p class="help-block"></p>
		</div>

		<div class="form-element">
			<div class="form-group">
				<label><span class="asterisk">*</span> 登录密码</label>
				<input id="password" type="password" name="data[password]" dtype="pwd" value="" class="form-control" maxlength="30" {[if item.password == null]} placeholder="登录密码" required {[else]} placeholder="不填写表示不更改" {[/if]}/>
			</div>
			<p class="help-block"></p>
		</div>

		<div class="form-element">
			<div class="form-group">
				<label><span class="asterisk">*</span> 确认密码</label>
				<input type="password" name="data[repass]" for-password="password" dtype="repass" value="" class="form-control" maxlength="30" placeholder="确认密码"{[if item.password == null]} required {[/if]}/>
			</div>
			<p class="help-block"></p>
		</div>

		<div class="form-element">
			<div class="form-group">
				<label>会员状态</label>
				<div class="bootstrap-switch-swrap">
					<input type="checkbox" class="bswitch bswitch-list" data-size="mini" {[if item.status == 1 ]}checked{[/if]} data-on-text="启用" data-off-text="禁用">
					<input type="hidden" name="data[status]" value="{[item.status]}">
				</div>
			</div>
			<p class="help-block"></p>
		</div>

		<input type="hidden" name="id" value="{[item.id]}">
	</form>
</script>

<script>
	seajs.use("user", function(exports) {
		exports.init({
			set_url : '/admin/user/set/',
			insert_url : '{$insert_url}',
			edit_url : '{$edit_url}',
			update_url : '{$update_url}',
		});
	});
</script>
</body>
</html>
